package com.woniu.system.dao;

import com.woniu.components.DAO.IEntityManagerHelper;
import org.hibernate.Session;
import org.hibernate.ejb.HibernateEntityManager;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * Created by IntelliJ IDEA.
 * User: xujin
 * Date: 2010-2-14
 * Time: 16:15:48
 * 蜗牛实体管理助类型实现
 */

public class WoniuEntityManagerHelper implements IEntityManagerHelper {
    @PersistenceContext(unitName="WONIU_PU")
    private HibernateEntityManager entityManager;

    public EntityManager getEntityManager() {
        return entityManager;
    }
    public Session getSession() {
        return entityManager.getSession();
    }
}
